using System;
using System.Collections.Generic;
using System.Text;
using System.Xml.Serialization;

namespace Easy.Geo.Kml
{
    public class ExtendedData
    {
        public ExtendedData()
        {
            this._listData = new List<Data>();
        }
        private List<Data> _listData;
        [XmlElement(ElementName="Data",Type=typeof(Data))]
        public List<Data> ListData
        {
            get { return _listData; }
            set { _listData = value; }
        }

        public void AddData(Data data)
        {
            this._listData.Add(data);
        }

        public Data AddData(string name, string value)
        {
            Data data = new Data(name, value);
            this.AddData(data);
            return data;
        }
        public Data AddData(string name, string displayName, string value) 
        {
            Data data = new Data(name, displayName, value);
            this.AddData(data);
            return data;
        }
    }
}
